import axios from 'axios';
import * as mock from '../test/mock';
import {HOST} from './constant';
const axiosIns = axios.create({
    baseURL: HOST,
    timeout: 3000
    // headers: { 'content-type': 'application/json', 'Accept': 'application/json' },
  });

  export function fetchData({params,api,method='GET'}){
    const res = axios({
      method,
      url:`${HOST}/${api}`,
      data:params
    })
    return res
  }
  export default axiosIns;